Cleberadm, vlw mesmo..funcionou direitin!..resp pra ti,que reformulou e pra Skymagnum pela iniciativa.
pedido atendido...podem fechar o tópico!
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

duvida sanada
reportado
para um superior
info
Grupo: Conde
Registrado: 17/07/11
Posts: 705
Reputação: +108

Tópico movido para Dúvidas e Pedidos Resolvidos - Servidores derivados pela dúvida ter sido resolvida.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino
Tenta
function onUse(cid, item)
local posEntrada = {x = 2396, y = 771, z = 8}
local posSaida = {x = 2396 , y = 771, z = 8}
local itemNeed = {{12159, 2}, {11447, 8}}
local levelNeed = 100
if getPlayerStorageValue(cid, 5557) > 0 then
doTeleportThing(cid, posSaida, true)
return true
end
if getPlayerLevel(cid) < levelNeed and getPlayerStorageValue(cid, 11111) < 1 then
return doPlayerSendCancel(cid, "You need a min level " .. levelNeed .. " to enter here.")
end
for _, t in pairs(itemNeed) do
if getPlayerItemCount(cid, t[1]) >= t[2] then
doPlayerRemoveItem(cid, t[1], t[2])
setPlayerStorageValue(cid, 5557, 2)
doTeleportThing(cid, posEntrada)
addEvent(doTeleportThing, 5 * 1000, cid, posSaida, true)
else
doPlayerSendTextMessage(cid, 26, "You don't have the necessary items.")
end
end
return true
end